#pragma once

#include <MyFC/CheckBox.h>

namespace My {

class CmdCheckBox;


class CheckBoxCmdUI : public CCmdUI {
private:
	CmdCheckBox &	m_Owner;
public:
	CheckBoxCmdUI(CmdCheckBox & b)
		: m_Owner(b) { }
public:
	virtual void Enable(BOOL bOn = TRUE);
	virtual void SetCheck(int nCheck = 1);
	virtual void SetRadio(BOOL bOn = TRUE);
	virtual void SetText(LPCTSTR lpszText);
};

class CmdCheckBox : public CheckBox {
private:
	UINT			m_Command;
	State			m_State;
	bool			m_Enabled;
public:
	CmdCheckBox(UINT nID, LPCTSTR szGlyph = "MYFC_CHECKBOX", LPCTSTR szMask = "MYFC_CHECKBOX_MASK");
public:
	virtual bool Enabled() const
		{ return m_Enabled; }
	virtual State GetState() const
		{ return m_State; }
public:
	void SetEnabled(bool on);
	void SetState(State s);
public:
	virtual void HandleUpdateUI();
	virtual void HandleClick( );
};


} // My
